home *** CD-ROM | disk | FTP | other *** search
Wrap
XXXXmmmmGGGGeeeettttSSSSeeeeccccoooonnnnddddaaaarrrryyyyRRRReeeessssoooouuuurrrrcccceeeeDDDDaaaattttaaaa((((UUUU3333NNNNXXXXIIII))))XXXX SSSSyyyysssstttteeeeXXXXmmmmmmmmGGGGVVVVeeeettttSSSSeeeeccccoooonnnnddddaaaarrrryyyyRRRReeeessssoooouuuurrrrcccceeeeDDDDaaaattttaaaa((((3333XXXX)))) NNNNAAAAMMMMEEEE XXXXmmmmGGGGeeeettttSSSSeeeeccccoooonnnnddddaaaarrrryyyyRRRReeeessssoooouuuurrrrcccceeeeDDDDaaaattttaaaa - A function that provides access to secondary widget resource data SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS ####iiiinnnncccclllluuuuddddeeee <<<<XXXXmmmm////XXXXmmmm....hhhh>>>> CCCCaaaarrrrddddiiiinnnnaaaallll XXXXmmmmGGGGeeeettttSSSSeeeeccccoooonnnnddddaaaarrrryyyyRRRReeeessssoooouuuurrrrcccceeeeDDDDaaaattttaaaa ((((_w_i_d_g_e_t__c_l_a_s_s, _s_e_c_o_n_d_a_r_y__d_a_t_a__r_e_t_u_r_n)))) WWWWiiiiddddggggeeeettttCCCCllllaaaassssssss _w_i_d_g_e_t__c_l_a_s_s;;;; XXXXmmmmSSSSeeeeccccoooonnnnddddaaaarrrryyyyRRRReeeessssoooouuuurrrrcccceeeeDDDDaaaattttaaaa********_s_e_c_o_n_d_a_r_y__d_a_t_a__r_e_t_u_r_n;;;; VVVVEEEERRRRSSSSIIIIOOOONNNN This page documents version 1.2 of the Motif library. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN Some Motif widget classes (such as Gadget, Text, and VendorShell) have resources that are not accessible via the functions XXXXttttGGGGeeeettttRRRReeeessssoooouuuurrrrcccceeeeLLLLiiiisssstttt and XXXXttttGGGGeeeettttCCCCoooonnnnssssttttrrrraaaaiiiinnnnttttRRRReeeessssoooouuuurrrrcccceeeeLLLLiiiisssstttt. In order to retrieve the descriptions of these resources, an application must use XXXXmmmmGGGGeeeettttSSSSeeeeccccoooonnnnddddaaaarrrryyyyRRRReeeessssoooouuuurrrrcccceeeeDDDDaaaattttaaaa. When a widget class has such resources, this function provides descriptions of the resources in one or more data structures. XXXXmmmmGGGGeeeettttSSSSeeeeccccoooonnnnddddaaaarrrryyyyRRRReeeessssoooouuuurrrrcccceeeeDDDDaaaattttaaaa takes a widget class argument and returns the number of these data structures associated with the widget class. If the return value is greater than 0, the function allocates and fills an array of pointers to the corresponding data structures. It returns this array at the address that is the value of the _s_e_c_o_n_d_a_r_y__d_a_t_a__r_e_t_u_r_n argument. The type XXXXmmmmSSSSeeeeccccoooonnnnddddaaaarrrryyyyRRRReeeessssoooouuuurrrrcccceeeeDDDDaaaattttaaaa is a pointer to a structure with two members that are useful to an application: _r_e_s_o_u_r_c_e_s, of type XXXXttttRRRReeeessssoooouuuurrrrcccceeeeLLLLiiiisssstttt, and _n_u_m__r_e_s_o_u_r_c_e_s, of type CCCCaaaarrrrddddiiiinnnnaaaallll. The _r_e_s_o_u_r_c_e_s member is a list of the widget resources that are not accessible using Xt functions. The _n_u_m__r_e_s_o_u_r_c_e_s member is the length of the _r_e_s_o_u_r_c_e_s list. If the return value is greater than 0, XXXXmmmmGGGGeeeettttSSSSeeeeccccoooonnnnddddaaaarrrryyyyRRRReeeessssoooouuuurrrrcccceeeeDDDDaaaattttaaaa allocates memory that the application must free. Use XXXXttttFFFFrrrreeeeeeee to free the resource list in each structure (the value of the _r_e_s_o_u_r_c_e_s member), the structures themselves, and the array of pointers to the structures (the array whose address is _s_e_c_o_n_d_a_r_y__d_a_t_a__r_e_t_u_r_n). _w_i_d_g_e_t__c_l_a_s_s Specifies the widget class for which secondary resource data is to be retrieved. Page 1 (printed 4/30/98) XXXXmmmmGGGGeeeettttSSSSeeeeccccoooonnnnddddaaaarrrryyyyRRRReeeessssoooouuuurrrrcccceeeeDDDDaaaattttaaaa((((UUUU3333NNNNXXXXIIII))))XXXX SSSSyyyysssstttteeeeXXXXmmmmmmmmGGGGVVVVeeeettttSSSSeeeeccccoooonnnnddddaaaarrrryyyyRRRReeeessssoooouuuurrrrcccceeeeDDDDaaaattttaaaa((((3333XXXX)))) _s_e_c_o_n_d_a_r_y__d_a_t_a__r_e_t_u_r_n Specifies a pointer to an array of XXXXmmmmSSSSeeeeccccoooonnnnddddaaaarrrryyyyRRRReeeessssoooouuuurrrrcccceeeeDDDDaaaattttaaaa pointers to be returned by this function. If the widget class has no secondary resource data (i.e., if the value returned by the function is 0), the function returns no meaningful value for this argument. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE Returns the number of secondary resource data structures associated with this widget class. EEEEXXXXAAAAMMMMPPPPLLLLEEEE The following example uses XXXXmmmmGGGGeeeettttSSSSeeeeccccoooonnnnddddaaaarrrryyyyRRRReeeessssoooouuuurrrrcccceeeeDDDDaaaattttaaaa to print the names of the secondary resources of the Motif Text widget and then frees the data allocated by the function: XmSecondaryResourceData * block_array ; Cardinal num_blocks, i, j ; if (num_blocks = XmGetSecondaryResourceData (xmTextWidgetClass, &block_array)) { for (i = 0; i < num_blocks; i++) { for (j = 0 ; j < block_array[i]->num_resources; j++) { printf("%s\n", block_array[i]->resources[j].resource_name); } XtFree((char*)block_array[i]->resources); XtFree((char*)block_array[i]); } XtFree((char*)block_array); } Page 2 (printed 4/30/98)